package com.forekenow.Demo6;

public class Test {

    public void m1(A a){
        a.eat();
    }

    public A m2(){
        A a = new AImplement();
        return a;
    }
    public static void main(String[] args) {
        Test test = new Test();
        A a = new AImplement();
        test.m1(a);
        A aa = test.m2();
        aa.eat();

    }
}
